package com.itbaizhan.search.controller;

import com.itbaizhan.common.vo.LivegoodsResult;
import com.itbaizhan.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SearchController {

    @Autowired
    private SearchService searchService;

    @GetMapping("/search")
    public LivegoodsResult search(String city, String content,Integer page, @RequestParam(defaultValue = "3") Integer size) {
        return searchService.search(city, content, page, size);
    }

}
